import type { RouteRecordRaw } from 'vue-router';

const moduleName = 'student';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/student',
    name: moduleName,
    redirect: '/student/classes',
    meta: {
      title: '学生管理',
      icon: 'ant-design:usergroup-add-outlined',
    },
    children: [
      {
        path: 'classes',
        name: `${moduleName}-classes`,
        meta: {
          title: '班级',
          icon: 'ant-design:home-filled',
        },
        component: () => import('@/views/student/classes.vue'),
      },
      {
        path: 'courses',
        name: `${moduleName}-courses`,
        meta: {
          title: '课程',
          icon: 'ant-design:book-outlined',
        },
        component: () => import('@/views/student/courses.vue'),
      },
      {
        path: 'users',
        name: `${moduleName}-users`,
        meta: {
          title: '用户',
          icon: 'ant-design:user-outlined',
        },
        component: () => import('@/views/student/users.vue'),
      },
    ],
  },
];

export default routes;
